package cn.sjhh.flow.conf;

import org.hibernate.SessionFactory;
import org.springframework.transaction.PlatformTransactionManager;

import com.bstek.uflo.env.EnvironmentProvider;

public class FlowEnvironmentProvider implements EnvironmentProvider {
	private SessionFactory sessionFactory;
	private PlatformTransactionManager platformTransactionManager;
	@Override
	public SessionFactory getSessionFactory() {
		return this.sessionFactory;
	}
	@Override
	public PlatformTransactionManager getPlatformTransactionManager() {
		return platformTransactionManager;
	}
	/**
	 *  @return 返回当前系统的登录用户	
	 */
	@Override
	public String getLoginUser() {
		return "anonymous";
	}
	/**
	 * @return 返回当前系统分类ID
	 */
	@Override
	public String getCategoryId() {
		return "200";
	}
	public void setSessionFactory(SessionFactory sessionFactory) {
		this.sessionFactory = sessionFactory;
	}
	public void setPlatformTransactionManager(PlatformTransactionManager platformTransactionManager) {
		this.platformTransactionManager = platformTransactionManager;
	}
}
